<?php
// +----------------------------------------------------------------------
// | saiadmin [ saiadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: your name
// +----------------------------------------------------------------------
namespace app\cassification\validate;

use think\Validate;

/**
 * 分类字典验证器
 */
class ClassificationDictionaryValidate extends Validate
{
    /**
     * 定义验证规则
     */
    protected $rule =   [
        'classification_type' => 'require',
        'classification_name_zh' => 'require',
        // 'classification_name_en' => 'require',
        // 'classification_name_ja' => 'require',
        // 'classification_name_ko' => 'require',
    ];

    /**
     * 定义错误信息
     */
    protected $message  =   [
        'classification_type' => '分类类型必须填写',
        'classification_name_zh' => '中文分类名称必须填写',
        // 'classification_name_en' => '英文分类名称必须填写',
        // 'classification_name_ja' => '日文分类名称必须填写',
        // 'classification_name_ko' => '韩文分类名称必须填写',
    ];

    /**
     * 定义场景
     */
    protected $scene = [
        'save' => [
            'classification_type',
            'classification_name_zh',
            'classification_name_en',
            'classification_name_ja',
            'classification_name_ko',
        ],
        'update' => [
            'classification_type',
            'classification_name_zh',
            'classification_name_en',
            'classification_name_ja',
            'classification_name_ko',
        ],
    ];

}
